<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script type="text/javascript">
    var v;
    console.log(v);//undefined
    console.log(typeof(v));//undefined
    v = 3.14;
    console.log(v);//3.14
    console.log(typeof(v));//number
    v = 'js';
    console.log(v);//js
    console.log(typeof(v));//string
    v = true;
    console.log(v);//true
    console.log(typeof(v));//boolean
    v = null;
    console.log(v);//null
    console.log(typeof(v));//object

    var m = '3';
    var n = 3;
    if (m == n) {//值相等就可以
      console.log('m==n')
    }
    if (m === n) {//值相等，类型也要相等
      console.log('m===n')
    }

    var str = 'hello jS';
    console.log(str.toLowerCase());
    console.log(str.toUpperCase());
    console.log(str.charAt(6));

    var str1 = 'Hello JS and Java';
    console.log(str1.indexOf('J'));//6
    console.log(str1.indexOf('JS'));//6
    console.log(str1.indexOf('JS', 9));//-1
    var str2 = 'how are you doing today';
    var array = str2.split(' ');
    console.log(array);
    console.log(array[0]);
    console.log('1:2:3:4'.split(':'));
  </script>
</head>
<body>

</body>
</html>